import request from "../../libs/request.js";
export default {
  login(data, options) {
    return request({
      url: "/sync",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  getOpenId(data, options) {
    return request({
      url: "/openid",
      method: "post",
      data,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  addAdvice(data, options) {
    return request({
      url: "/advice",
      method: "post",
      data,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  addRecord(data, options) {
    return request({
      url: "/add",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  deleteRecord(data, options) {
    return request({
      url: "/delete",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  syncTargetWeight(data, options) {
    return request({
      url: "/targetWeight",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  syncUnit(data, options) {
    return request({
      url: "/unit",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  syncBodyHeight(data, options) {
    return request({
      url: "/bodyHeight",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  syncSex(data, options) {
    return request({
      url: "/sex",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  syncBirth(data, options) {
    return request({
      url: "/birthYear",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
  syncRemind(data, options) {
    return request({
      url: "/remind",
      method: "post",
      data,
      showLoading: false,
      showError: false,
      header: {
        "Content-Type": "application/json",
      },
      ...options,
    });
  },
};
